<html>
<body>
Reports local variables of wrapper type that are mostly used as primitive types.
<p>In some cases, boxing can be source of significant performance penalty, especially in loops.</p>
<p>Heuristics are applied to estimate the number of boxing operations. For example, conversions inside loops are considered
  as much more numerous.</p>

<p><b>Example:</b></p>
<pre><code>  public void example() {
    Integer value = 12;
    needBox(value);
    for (int i = 0; i &lt; 10; i++) {
      // Loop usages considered as happening more often
      needPrimitive(value);
    }
  }

  void needPrimitive(int value) {}
  void needBox(Integer value) {}
</code></pre>
<p>After the quick-fix is applied:</p>
<pre><code>  public void example() {
    int value = 12;
    needBox(value);
    for (int i = 0; i &lt; 10; i++) {
      // Loop usages considered as happening more often
      needPrimitive(value);
    }
  }

  void needPrimitive(int value) {}
  void needBox(Integer value) {}
</code></pre>
<!-- tooltip end -->
<p>
  <small>New in 2018.2</small>
</p>
</body>
</html>